#pragma once

#include <memory>
#include <string>

#include "stream/IOpenable.h"

namespace stream {

class Topic : public IOpenable {
public:

	Topic(const std::string & name, const std::string & directory)
	: _name(name)
	, _directory(directory)
	{
	}
	
	virtual ~Topic(){}

	const std::string & name() const{
		return _name;
	}
	const std::string & directory() const{
		return _directory;
	}

	virtual int append(const std::string & key, const std::string & value)  = 0;
    virtual bool get(const std::string & key, std::string & value) = 0;

	virtual size_t size() const = 0;
	virtual void clear() = 0;

private:
	std::string _name;
	std::string _directory;
};

Topic * makeTopic(const std::string & name, const std::string & directory);

}//end namespace stream
